package com.admin.model.pojo;


import com.admin.model.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.io.Serializable;
import java.util.List;

/**
 * (Dept)实体类
 *
 * @author makejava
 * @since 2021-01-31 20:16:25
 */
@TableName(value = "sys_dept",resultMap = "BaseResultMap")
@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
public class Dept extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 759056931803829856L;
    /**
    * id
    */
    private Long id;
    /**
    * 上级部门
    */
    private Long pid;
    /**
    * 部门名称
    */
    @TableField(condition = SqlCondition.LIKE)
    private String name;
    /**
    * 排序
    */
    private Integer sort;
    /**
    * 状态
    */
    private Boolean enabled;
    /**
     * 子部门
     */
    @TableField(exist = false)
    private List<Dept> children;
}